<template>
	<view>
		<view class="activity">
			<image :src="info.cover" mode="widthFix"></image>
			<view class="title">{{info.title}}</view>
			<view class="content">
				<jyf-parser :html="info.content"></jyf-parser>
			</view>
		</view>
		<!-- 底部安全区适配 -->
		<view class="safe-area-inset-bottom"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				activity_id:'',
				info:''
			}
		},
		methods: {
			getInfo(){
				this.$u.api.activityDetail({
					activity_id:this.activity_id
				}).then(res=>{
					this.info = res
				})
			}
		},
		onLoad(opts) {
			this.activity_id = opts.id
			this.getInfo()
		}
	}
</script>

<style lang="scss">
	.activity{
		padding: 0 40rpx;margin-top: 20rpx;
		image{border-radius: 20rpx;display: block;width: 100%;}
		.title{font-size: 32rpx;font-weight: bold;margin-top: 40rpx;}
		.remark{word-break: break-word;text-align: justify;margin-top: 20rpx;}
	}
</style>
